<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
</head>
<body>

<div id="app">
    <ul>
        <todo-item v-for="item in groceryList" :todo="item"  :key="item.id"></todo-item>
    </ul>
</div>
<script>
    Vue.component("todo-item", {
        props: ['todo'],
        template: '<li>{{todo.text}}</li>'
    });

    const app = new Vue({
        el: '#app',
        data: {
            groceryList: [
                {id: 0, text: "Vegetables"},
                {id: 1, text: "Cheese"},
                {id: 2, text: "Vegetables"},
                {id: 3, text: "Whatever else humans are supposed to eat"}
            ]
        }
    })
</script>
</body>
</html>
